import request from '@/utils/request'

// 发布题目
export const questionAddPost = (data) => {
  return request({
    url: '/question/add',
    method: 'post',
    data
  })
}

// 获取题目信息
export const questionOnePost = (data) => {
  return request({
    url: '/question/one',
    method: 'post',
    data
  })
}

// 设置题目状态
export const questionStatusPost = (data) => {
  return request({
    url: '/question/status',
    method: 'post',
    data
  })
}

// 删除题目
export const questionRemovePost = (data) => {
  return request({
    url: '/question/remove',
    method: 'post',
    data
  })
}

// 编辑题目接口
export const questionEditPost = (data) => {
  return request({
    url: '/question/edit',
    method: 'post',
    data
  })
}

// 题目列表
export const questionList = (params) => {
  return request({
    url: '/question/list',
    params
  })
}

// 上传文件
export const questionUploadPost = (data) => {
  return request({
    url: '/question/upload',
    method: 'post',
    data
  })
}
